refactor(kyc): drop unreachable KycRequired registration state#705
Merged
Merged
Conversation
The API (DFXswiss/api#3836) removed KycRequired from RealUnitRegistrationState (YAGNI — no longer emitted by GET /v1/realunit/registration). Remove the now-unreachable consumer handling: the enum arm, the KycCubit dispatch case, the KycRequiredFailure state and its KycPageManager mapping, the kycRequiredFailureMessage i18n key (de/en), a stale DTO doc comment, the wallet-modes doc references, and the obsolete parse/cubit tests. PaymentInfoError.kycRequired and the transaction status kycRequired are unrelated and remain untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backend DFXswiss/api#3836 drops
KycRequiredfromRealUnitRegistrationState(YAGNI — it is no longer emitted byGET /v1/realunit/registration). This removes the now-unreachable consumer-side handling so the app stops carrying dead code for a state the API never sends.Changes
real_unit_registration_state.dart— remove thekycRequired(jsonName: 'KycRequired')enum value.kyc_cubit.dart— remove thecase RealUnitRegistrationState.kycRequireddispatch arm.kyc_state.dart— remove theKycRequiredFailurestate class.kyc_page_manager.dart— remove theKycRequiredFailure()→KycFailurePageswitch arm.real_unit_registration_info_dto.dart— drop the stalekycRequiredmention from the doc comment.strings_de.arb/strings_en.arb— remove the unusedkycRequiredFailureMessagekey.docs/wallet-modes.md— drop the registrationKycRequiredreferences.KycRequiredparse test and theKycRequiredFailurecubit test.Note
PaymentInfoError.kycRequired(buy/sell) and the transaction-statuskycRequiredare unrelated concepts and remain untouched. After this change, an unexpectedstate: 'KycRequired'payload would throwArgumentError(covered by the existing unknown-state test) — acceptable since the API no longer emits it.Test plan
flutter analyze— clean (only a pre-existing, unrelated generated-i18n warning present onstaging)flutter test— 2272 non-golden tests pass